package com.example.forum.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.forum.entity.TMenus;
import com.example.forum.mapper.TMenusMapper;
import com.example.forum.service.ITMenusService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author why
 * @since 2019-10-30
 */
@Service
public class TMenusServiceImpl extends ServiceImpl<TMenusMapper, TMenus> implements ITMenusService {
    @Resource
    private TMenusMapper menusmapper;
    public String[]	findPermissionsNotParentByRoleId(String RoleId) {
        var list = menusmapper.findPermissionsNotParentByRoleId(RoleId);
        return (String[])list.toArray(new String[0]);

    }
    public String[]	findParentPermissionsId() {
        var list = menusmapper.findParentPermissionsId();
        return (String[])list.toArray(new String[0]);
    }
}
